<template>
	<view :style="{'--btn-color':configInfo.btnColor}">
		<u-button :shape ="shape" :formType="formType" :color="'linear-gradient(25deg,'+configInfo.mainColor+','+configInfo.mainColor1+'95)'" :style="{'color':configInfo.btbColor,'box-shadow': '0 5px 10px 0 '+configInfo.mainColor+'30'}" :text="text" :loading="loading" :disabled="loading || disabled" loadingText=" " @click="submit"></u-button>
	</view>
</template>

<script>
	import {
		mapState
	} from "vuex"
	export default {
		name:"m-button",
		props: ['text','loading','formType','shape','disabled'],
		data() {
			return {
				
			};
		},
		computed: mapState({
			userInfo: state => state.user.userInfo,
			configInfo: state => state.config.configInfo,
		}),
		methods: {
			submit(){
				this.$emit('submit')
			}
		}
	}
</script>

<style lang="scss">
	/deep/ .u-button{
		color: var(--btn-color)!important;
	}
</style>